package com.sh.healthtv.app;


import com.sh.healthtv.net.entity.Epg;
import com.sh.healthtv.tencent.SonicRuntimeImpl;
import com.tencent.sonic.sdk.SonicConfig;
import com.tencent.sonic.sdk.SonicEngine;

import org.litepal.LitePalApplication;

/**
 * Created by zhouyucheng on 2017/8/3.
 */

public class AppContext extends LitePalApplication {
    private  static Epg CURRENTEPG;

    public static Epg getCURRENTEPG() {
        return CURRENTEPG;
    }

    public static void setCURRENTEPG(Epg CURRENTEPG) {
        AppContext.CURRENTEPG = CURRENTEPG;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        // init sonic engine if necessary, or maybe u can do this when application created
        if (!SonicEngine.isGetInstanceAllowed()) {
            SonicEngine.createInstance(new SonicRuntimeImpl(this), new SonicConfig.Builder().build());
        }
    }
}
